package com.bupt.uchouten.common.register;

import com.bupt.uchouten.common.block.entity.TenkaiVigorousVineBlockEntity;
import com.bupt.uchouten.common.util.Reference;
import com.google.common.collect.ImmutableSet;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

@SuppressWarnings("DataFlowIssue")
public final class UchoutenBlockEntities {
    public static final DeferredRegister<BlockEntityType<?>> REGISTER = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, Reference.MODID);

    public static final RegistryObject<BlockEntityType<TenkaiVigorousVineBlockEntity>> TENKAI_VIGOROUS_VINE_BLOCK_ENTITY = REGISTER.register(
            "tenkai_vigorous_vine", () -> new BlockEntityType<>(
                    TenkaiVigorousVineBlockEntity::new,
                    ImmutableSet.of(UchoutenBlocks.FunctionalBlocks.TENKAI_VIGOROUS_VINE_BLOCK.get()),
                    null
            )
    );

    public static void init(IEventBus bus) {
        REGISTER.register(bus);
    }

    private UchoutenBlockEntities() {
    }
}
